﻿using ExpressesClass.KyApi.Base;
using ExpressesClass.KyApi.billApply.response;
using ExpressesClass.KyApi.Util;
using Newtonsoft.Json;
using System.Collections.Generic;

namespace ExpressesClass.KyApi.billApply.request
{
    public class BillApplyReq : KyRequest
    {
        public BillApplyReq()
        {
            this.customerCode = "";
            this.platformFlag = "";
            this.orderInfos = new List<OrderInfo>();
            this.repeatCheck = "";
        }

        public string customerCode { get; set; }

        public string platformFlag { get; set; }

        public List<OrderInfo> orderInfos { get; set; }

        public string repeatCheck { get; set; }

        public override string GetMethodCode()
        {
            return ConfigUrl.GetMethodCode("CREATE");
        }

        public override string GetTokenUrl()
        {
            return ConfigUrl.GetTokenUrl();
        }

        public override string GetUrl()
        {
            return ConfigUrl.GetUrl();
        }

        public override KyResponse makeResponse(string rsp)
        {
            return JsonConvert.DeserializeObject<BillApplyRsp>(rsp);
        }
    }
}
